package com.emin.platform.subjectcenter.entity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 * @author Yong
 * @name 行业的实体类
 * @date 2017-10-23
 * @since 1.0.1
 */
@Entity
@Table(name = "emin_industory", schema = "ecmcenter")
public class Industory extends BaseicEntity {

    private static final long serialVersionUID = 3018333047175131830L;

    /**
     * 行业的名称
     **/
    private String name;

    @Id
    @Override
    @Column(length = 20)
    @SequenceGenerator(name = "industory_id_seq", sequenceName = "public.industory_id_seq",
            allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "industory_id_seq")
    public Long getId() {
        return super.getId();
    }


    @Override
    public void setId(Long id) {
        super.setId(id);
    }

    @NotNull
    @Column(name = "industory_name", unique = true, length = 20)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
